package com.purple;

import java.io.IOException;
import java.time.LocalDateTime;

public class ScreenLogAppender implements LogAppender {
    @Override
    public void append(Object o) {
        String r = String.format("线程：[%s] 时间：<%s> ====>>> %s",
                Thread.currentThread().getName(),
                LocalDateTime.now().toString(),
                o.toString());
        System.out.println(r);
    }

    @Override
    public void close() throws IOException {
        System.out.println("屏幕流　不必关闭");
    }
}
